<?php
class Cms_View_Helper_Profile
{
    public $view;

    public function profile()
    {/*
		$query = new Doctrine_Query();
		$query->select("u.user_id, 
						CONCAT(upd.firstName, ' ', upd.middleName, ' ', upd.lastName) as name, 
						u.userType_id,
						upd.photo,
						ue.type, 
						ue.college, 
						ue.degree, 
						ue.field,
						uemp.specialities, 
						uemp.title_id, 
						uemp.title, 
						uemp.employer
						")
			  ->addSelect('(SELECT c.credential FROM Credential c WHERE c.credential_id in (uemp.credentials)) as credential')
			  ->addSelect('(SELECT s.function_name FROM Speciality s WHERE s.function_id in (uemp.specialities)) as speciality')
			  ->from('User u')
			  ->leftJoin('u.UserPersonalDetail upd')
			  ->leftJoin('u.UserEducation ue')
			  ->leftJoin('u.UserEmployment uemp')
			  ->where('u.user_id = ' .  $_SESSION['MWC_Auth']['UID'])
			  ->orderBy('u.created_on DESC');
		
		$result = $query->execute();

		echo '
		<table width="325"  border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="253" height="64" align="right">
              			<span class="bodytext10pt"><strong>' . $result[0]['name'] . '</strong></span><br />';
		if($result[0]['usertype_id'] != 1 ){
			echo '		<span class="bodytext8pt"> ' . $result[0]['credential'] . ' </span><br />
						<span class="bodytext8pt">' . $result[0]['speciality'] . '</span><br />
						<span class="bodytext8pt">' . $result[0]['UserEmployment'][0]['employer'] . '</span><br />';
		} else {
			echo '		<span class="bodytext8pt">' . $result[0]['UserEducation'][0]['college'] . '</span><br />
						<span class="bodytext8pt">' . $result[0]['UserEducation'][0]['degree'] . '</span><br />';
		}
		echo '
					</td>
					<td width="72" align="right">
						<table cellpadding="0" cellspacing="0">
							<tr>
								<td>';
									if($result[0]['UserPersonalDetail'][0]['photo'] != '') {
										$photo =  '/Uploads/Userpics/' . $result[0]['UserPersonalDetail'][0]['photo'];
										echo '<img src=" '.$photo. '" alt="" width="62" height="62"/>';
									} else {
										echo '<img src="/images/user.gif" alt="" width="62" height="62"/>';
									}
		echo '
								</td>
							</tr>
						</table>
					</td>
				</tr>
    		</table>';
    */}

    public function setView(Zend_View_Interface $view)
    {
        $this->view = $view;
    }
}
?>